/* assassin.h
 *
 * Copyright 2007-2008 OpenMoko, Inc.
 * Authored by Tick <tick@openmoko.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */


#ifndef __OPENMOKO_INSTALLER_H__
#define __OPENMOKO_INSTALLER_H__
#define PACKAGE_NAME "Assassin"
#define THUMBNAIL_FILE	"thumbnail.eet"

#define MAX_PACKAGE_NAME_SIZE 1024

#define SCREEN_WIDTH		480
#define SCREEN_HEIGHT		568
#define SCREEN_COLOR		0x000000

// https://wiki.internal.openmoko.org/wiki/Image:Alert_confirmation_details.png

#define PROGRESSBAR_HEIGHT	120
#define PROGRESSBAR_WIDTH	480
#define PROGRESSBAR_COLOR	0x00ff00
#define PROGRESSBAR_TEXT_FONT  	"LiberationSans-Bold"
#define PROGRESSBAR_TEXT_SIZE	16
#define PROGRESSBAR_TEXT_COLOR	0xffffff
#define PROGRESSBAR_ALPHA	255



enum ActionType {
    INSTALL = 0,
    UPDATE,
    UNINSTALL,
};

enum ActionStatus {
    INITIAL = 0,
    WAITCONFIRM,
    DOWNLOADING,
    INSTALLING,
    UPDATING,
    UNINSTALLING,
    REFRESHING,
    SUCCESS,
    FAILED
};

struct Target {
    enum ActionType type;
    enum ActionStatus status;
    char *package;
    char *alias;
    char *message;
    char retry;
    char need_refresh;
    int progress;
};
struct Target * target_new();
void target_free(struct Target * target);

#endif
